﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Microsoft.Practices.Unity;

namespace Skynet.WebSite.Administracion
{
    public partial class WebAdminView : Infrastructure.Web.Views.Page, WebAdministracion.Views.WebAdmin.IWebAdminView
    {

        private Skynet.WebAdministracion.Views.WebAdmin.WebAdminPresenter _Presenter;
        [Dependency]
        public Skynet.WebAdministracion.Views.WebAdmin.WebAdminPresenter Presenter
        {
            get { return _Presenter; }
            set {
                _Presenter = value;
                _Presenter.View = this; 

            }
        }
        

        protected void Page_Load(object sender, EventArgs e)
        {
            if (!Page.IsPostBack)
            {
                this.Presenter.OnViewInitialized();
            }
            this.Presenter.OnViewLoaded();
        }

        protected void LinkButton1_Click(object sender, EventArgs e)
        {
            this.Presenter.EncryptConnectionString();
        }

        protected void LinkButton2_Click(object sender, EventArgs e)
        {
            this.Presenter.DecryptConnectionString();
        }
    }
}